package tests;
import org.jfugue.Pattern;
import org.jfugue.Player;
import org.jfugue.Rhythm;


public class Main {
	
	public static void main(String[] args) {
		/*Rhythm rhythm = new Rhythm();
		rhythm.setLayer(1, "................");
		rhythm.setLayer(2, "...*...*...*...*");
		rhythm.setLayer(3, "^^^.^^^.^^^.^^^.");
		rhythm.setLayer(4, "...............!");
		rhythm.addSubstitution('O', "[BASS_DRUM]i");
		rhythm.addSubstitution('o', "Rs [BASS_DRUM]s");
		rhythm.addSubstitution('*', "[ACOUSTIC_SNARE]s");
		rhythm.addSubstitution('^', "[PEDAL_HI_HAT]s");
		rhythm.addSubstitution('!', "[CRASH_CYMBAL_1]s");
		rhythm.addSubstitution('.', "Rs");
		Pattern pattern = rhythm.getPattern();
		pattern.repeat(4);
		Player player = new Player();
		player.play(pattern);*/	
		Player player = new Player();
		Pattern pattern1 = 
			new Pattern("V0 I[Cello]  C5majw      A4min^w     F4maj^^w    G4maj^Bw " + 
					    "V1 I[Piano]  C5h E5q G5q C5h E5q A5q C5h F5q A5q B4h D5q G5q");
		pattern1.repeat(4);
		
		Rhythm r = new Rhythm();
		r.setLayer(1, "*   *   *   *");
		//r.setLayer(2, "----------------");
		r.addSubstitution('*', "V0 I[Violin] C5majw");
		//r.addSubstitution('-', "V1 I[Cello] C6");
		Pattern p = r.getPattern();
		player.play(pattern1);
	}

}
